<?php
namespace Admin\Controller;

class IndexController extends AdminController {
    public function index(){
        $model = M('user_info');
        $normal = $model->field('count(status)')->where('status = 0')->select();
        $normal = $normal[0]['count(status)'];
        $kill = $model->field('count(status)')->where('status = 2')->select();
        $kill = $kill[0]['count(status)'];
        $nospeak = $model->field('count(status)')->where('status = 1')->select();
        $nospeak = $nospeak[0]['count(status)'];
        $total = $model->field('count(id)')->select();
        $total = $total[0]['count(id)'];
        $model2 = M('experience');
        $data2 = $model2->field('count(id)')->select();
        $num = $data2[0]['count(id)'];
        $this->assign('num',$num);
        $this->assign('normal',$normal);
        $this->assign('kill',$kill);
        $this->assign('nospeak',$nospeak);
        $this->assign('total',$total);
        $this->display('Index/index');
    }
}